package cn.exrick.xboot.supervisionDepartment.controllerImpl

import cn.exrick.xboot.base.entity.LawAndRegulations
import cn.exrick.xboot.base.service.ILawAndRegulationsService
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.supervisionDepartment.controller.ISupervisionDepartmentController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class LawAndRegulationsController : ISupervisionDepartmentController.ILawAndRegulations {


    @Autowired
    private lateinit var iLawAndRegulationsService: ILawAndRegulationsService

    override fun createOrUpdateLawAndRegulations(lawAndRegulations: LawAndRegulations): Result<Any?>? {

        return iLawAndRegulationsService.createOrUpdateLawAndRegulations(lawAndRegulations)
    }

    override fun getLawAndRegulationDetail(id: String?): Result<LawAndRegulations?>? {

        return iLawAndRegulationsService.getLawAndRegulationDetail(id)
    }

    override fun removeAccidentCase(ids: Array<out String>): Result<Any?>? {

        return iLawAndRegulationsService.removeLawAndRegulations(ids)
    }

    override fun getAccidentCaseList(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iLawAndRegulationsService.getLawAndRegulationsList(pageVo)
    }


}